function bindData(rowData){
//	debugger;
	var streetName = rowData.streetName;	
	$('#streetName_jump').val(streetName);
//	alert(streetName);
	
	$('#laborStreetGrid').datagrid({ 
		url:'collect/management/getLaborStreetList', 
		queryParams:{
			streetName:streetName,
			streetId:""
	    },
		rownumbers:true,
        fit:true,
        fitColumns:true,
        singleSelect:true,
        striped:true,
    
        columns:[[
                  {field:'communityName', title:'社区名称', width:100, rowspan:3, align:'center'},
                  {field:'laborNumInAge', title:'户籍劳动年龄<br/>内人口总数', width:90, rowspan:3, align:'center'},
                  {title:'目前状况', colspan:8, align:'center'}, 
                  {field:'employedRate', title:'就业率', width:85, rowspan:3, align:'center'},
                  {field:'companyRate', title:'单位就业率', width:85, rowspan:3, align:'center'}
                ],[
                  {title:'就业人员情况', colspan:5, align:'center'},
                  {field:'unJobPeople', title:'无业求职人员', width:90, rowspan:2, align:'center'},    
                  {field:'undesirePeople', title:'无就业愿望人员', width:90, rowspan:2, align:'center'},
                  {field:'loseTouchPeople', title:'失联人员', width:85, rowspan:2,align:'center'}
                ],[
                  {field:'subTotal', title:'小计', width:85, align:'center'},    
                  {field:'company', title:'单位就业', width:85, align:'center'},
                  {field:'flexibleEmployed', title:'灵活就业', width:85, align:'center'},    
                  {field:'selfEmployed', title:'自主创业', width:85, align:'center'},
                  {field:'individualOperation', title:'个体经营', width:85, align:'center'}
                ]]	
    }); 
}

function laborCommunity(){
	var rowData = $('#laborStreetGrid').datagrid('getSelected');
	if(rowData == undefined){
		$.messager.alert('消息','请选择社区');
	}else{
		var isExists = window.mainpage.mainTabs.isExists('劳动力就业情况汇总表（社区）', 'collect/management/laborCollect_community_jump');
	    switch (isExists) {
	        case 0: 
	    	    window.mainpage.mainTabs.createTab('劳动力就业情况汇总表（社区）','collect/management/laborCollect_community_jump',
	    	        '', true, true, true, true, {name: 'bindData', params: rowData}); break;
	        case 1: 
	    	    window.mainpage.mainTabs.createTab('劳动力就业情况汇总表（社区）','collect/management/laborCollect_community_jump',
	    	        '', true, true, true, true, {name: 'bindData', params: rowData}); break;
	        case 2: 
	    	    window.mainpage.mainTabs.jumpTab('劳动力就业情况汇总表（社区）', {name: 'bindData', params: rowData}); break;
	        default: break;
	    }
	}
}

function exportLaborStreetList(){
	var streetName = $('#streetName_jump').val();
	window.location.href ="collect/excel/exportLaborStreetCollect?streetName=" + streetName + "&streetId=" + "";	
}
